package cn.jiangjiesheng.bootstrap.fileport.infrastructure.convert;


import cn.jiangjiesheng.bootstrap.fileport.infrastructure.utils.DateUtils;
import lombok.extern.slf4j.Slf4j;

/**
 * @author pengzy
 */
@Slf4j
public class TimeConvert implements ExportConvert {

    @Override
    public String handler(Object val) {
        try {
            if (val == null) {
                return "";
            }
            return DateUtils.formatCSTTime("yyyy-MM-dd HH:mm:ss", val.toString());

        } catch (Exception e) {
            log.error("时间转换异常", e);
            return "";
        }
    }

}
